<!--Playing（正在上映）-->
<template>
    <div class="">
        <ul class="m-list">
            <li v-for="play in nowList">
                <router-link :to="{name: 'detail', params :{'id':play.id } }">
                <img :src="play.cover.origin" alt="">
                <div class="list-box">
                    <div class="left">
                        <p class="titl" v-text="play.name"></p>
                        <p class="info">
                            <span v-text="play.cinemaCount"></span>
                            <span>家影院上映 </span>
                            <span v-text="play.watchCount"></span>
                            <span>人购票</span>
                        </p>
                    </div>
                    <div class="right" v-text="play.grade"></div>
                </div>
                </router-link>
            </li>
        </ul>
        <div class="more-button">更多热映电影</div>
    </div>
</template>

<script>
    import $ from 'jquery';
    export default {
        
        data: function () {
            return {
                nowList : []
            }
        },
        mounted:function () {
            var url  = 'http://localhost:3000/playing?time=' + new Date().getTime();
            var that = this;
            $.get(url,function(res){
                
                that.nowList = res.data.films;
               
            })
        }
    }
</script>